home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- PRODUCT : Paradox NUMBER : 796
- VERSION : 2.0 & up
- OS : DOS
- DATE : August 26, 1991 PAGE : 1/1
-
- TITLE : The SELECT Command for variables in Menu Choices
-
-
-
-
- In menu equivalent scripts, (i.e. scripts that simulate menu
- selections) menu selections are automated into scripts by placing
- the menu choices in curly braces. For example this is a simple
- query script:
-
- {Ask} {table1} Check Do_it!
-
- A problem arises when a menu choice is variable. If you wanted
- to query different tables with the same script, you could use the
- SELECT command to simulate selecting a table based on the value
- of a PAL variable. Say you have five tables in the C:\DATA
- directory which you would like to query in the same manner. You
- could do table selection based on the assignment of the variable
- 'tbl' using the SHOWTABLES command. The following shows making a
- table selection using the SELECT command.
- _________________________________________________________________
-
- SHOWTABLES ; show list of tables
- "c:\\DATA"
- "Highlight name of the table to query, then press Enter."
-
- TO tbl ; assign tablename to tbl
-
- {Ask} SELECT tbl CHECK ; select the table using
- Do_it! ; the SELECT command
-
- ; or you could also use the ACCEPT command for user input.
- _________________________________________________________________
-
- @ 10,10 ?? "Enter a table's name for querying: " ; put a prompt
- ; on screen
- ACCEPT "A8" REQUIRED TO tbl ; accept a value
- ; from user
-
- IF NOT retval THEN ; retval = False if
- RETURN "No Table selected" ; <Esc> was press
- ENDIF
-
- {Ask} SELECT tbl CHECKPLUS
- Do_It!
-
-
-
-
-
-
-
-
-
-